Skip to content

Fix macOS custom shortcut capture#114

Open
matthewcorven wants to merge 3 commits intoTomBadash:masterfrom
matthewcorven:copilot/shortcut-capture-fix
Open

Fix macOS custom shortcut capture#114
matthewcorven wants to merge 3 commits intoTomBadash:masterfrom
matthewcorven:copilot/shortcut-capture-fix

Conversation

@matthewcorven
Copy link
Copy Markdown

@matthewcorven matthewcorven commented Apr 18, 2026

Closes #113.

This keeps the PR focused on the macOS custom-shortcut capture path and the resulting UI wording:

  • move Qt key and modifier interpretation into the backend so captured Command and Control chords normalize to stored super and ctrl correctly on macOS
  • accept raw Qt enum objects from QML and switch the key handler to an explicit function form to avoid the runtime enum coercion issue
  • keep Super as the canonical displayed label while still accepting existing aliases in capture and help text
  • reuse backend action-label rendering so custom shortcut labels display consistently across the UI

Validation:

  • "$HOME/.local/share/Mouser/venv/bin/python" -m unittest tests.test_backend.BackendDeviceLayoutTests.test_shortcut_capture_accepts_qt_enum_objects tests.test_backend.BackendDeviceLayoutTests.test_shortcut_capture_keeps_ctrl_and_super_distinct_on_macos tests.test_backend.BackendDeviceLayoutTests.test_shortcut_capture_preserves_default_qt_modifier_names_off_macos tests.test_key_simulator.CustomShortcutCaptureTests
  • rebuilt the local macOS app with PyInstaller and validated ~/.local/bin/mouser --hid-backend=bogus returns the expected invalid-backend failure

matthewcorven and others added 3 commits April 17, 2026 23:12
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@matthewcorven matthewcorven changed the title Fix custom shortcut capture Fix macOS custom shortcut capture Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom shortcut dialog should capture Cmd/Option/Win chords

1 participant